package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class filecopy {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("a.png");
        FileOutputStream fos = new FileOutputStream("b.png");
        int n=-1;
        while ((n=fis.read())!=-1){
            fos.write(n);
        }
        fos.close();
        fis.close();
    }
}
